This file describes the use of the VNIC ULP service on an OFED stack
and covers the following points:

A) Creating VNIC interfaces
B) Discovering VEx IOCs present on the fabric using ibvexdm
C) Starting the VNIC driver and the VNIC interfaces
D) Assigning IP addresses etc for the VNIC interfaces
E) Information about the VNIC interfaces
F) Deleting a specific VNIC interface

A) Creating VNIC interfaces

The VNIC interfaces can be created with the help of
the configuration file /etc/infiniband/qlogic_vnic.cfg
(If this file is missing, /etc/sysconfig/ics_inic.cfg
will be used for configuration)

Please take a look at qlogic_vnic.cfg.sample to see
how VNIC configuration files are written. You can use
this configuration file as the basis for creating
a configuration file by replacing the IOCGUID, 
IOCSTRING values with those of the VEx IOCs present
on your fabric.

B) Discovering VEx IOCs present on the fabric using ibvexdm

For writing the configuration file, you will need information
about the VEx IOCs present on the fabric like their IOCGUID,
IOCSTRING etc. The ibvexdm tool should be used to get this
information. 

When ibvexdm is executed without any options, it displays
detailed information about all the VEx IOCs present on the fabric:

# ibvexdm
IO Unit Info:
    port LID:        0003
    port GID:        fe8000000000000000066a0258000001
    change ID:       0009
    max controllers: 0x03


    controller[  1]
        GUID:      00066a0130000001
        vendor ID: 00066a
        device ID: 000030
        IO class : 2000
        ID:        Chassis 0x00066A00010003F2, Slot 1, IOC 1
        service entries: 2
            service[  0]: 1000066a00000001 / InfiniNIC.InfiniConSys.Control:01
            service[  1]: 1000066a00000101 / InfiniNIC.InfiniConSys.Data:01

    controller[  2]
        GUID:      00066a0230000001
        vendor ID: 00066a
        device ID: 000030
        IO class : 2000
        ID:        Chassis 0x00066A00010003F2, Slot 1, IOC 2
        service entries: 2
            service[  0]: 1000066a00000002 / InfiniNIC.InfiniConSys.Control:02
            service[  1]: 1000066a00000102 / InfiniNIC.InfiniConSys.Data:02

    controller[  3]
        GUID:      00066a0330000001
        vendor ID: 00066a
        device ID: 000030
        IO class : 2000
        ID:        Chassis 0x00066A00010003F2, Slot 1, IOC 3
        service entries: 2
            service[  0]: 1000066a00000003 / InfiniNIC.InfiniConSys.Control:03
            service[  1]: 1000066a00000103 / InfiniNIC.InfiniConSys.Data:03


When ibvexdm is run with -e option, it reports the IOCGUID information 
and with -s option it reports the IOCSTRING information for the VEx IOCs
present on the fabric.

# ibvexdm -e
ioc_guid=00066a0130000001,dgid=fe8000000000000000066a0258000001,pkey=ffff
ioc_guid=00066a0230000001,dgid=fe8000000000000000066a0258000001,pkey=ffff
ioc_guid=00066a0330000001,dgid=fe8000000000000000066a0258000001,pkey=ffff

#ibvexdm -s
"Chassis 0x00066A00010003F2, Slot 1, IOC 1"
"Chassis 0x00066A00010003F2, Slot 1, IOC 2"
"Chassis 0x00066A00010003F2, Slot 1, IOC 3"

#ibvexdm -es
ioc_guid=00066a0130000001,dgid=fe8000000000000000066a0258000001,pkey=ffff,"Chassis 0x00066A00010003F2, Slot 1, IOC 1"
ioc_guid=00066a0230000001,dgid=fe8000000000000000066a0258000001,pkey=ffff,"Chassis 0x00066A00010003F2, Slot 1, IOC 2"
ioc_guid=00066a0330000001,dgid=fe8000000000000000066a0258000001,pkey=ffff,"Chassis 0x00066A00010003F2, Slot 1, IOC 3"

C) Starting the VNIC driver and the VNIC interfaces

Once you have created a configuration file, you can start the VNIC driver
and create the VNIC interfaces specified in the configuration file with:

#/sbin/service ql_vnic start

You can stop the VNIC driver and bring down the VNIC interfaces with

#/sbin/service ql_vnic stop

To restart the VNIC driver, you can use

#/sbn/service ql_vnic restart

D) Assigning IP addresses etc for the VNIC interfaces

This can be done with ifconfig or by setting up the ifcfg-XXX (ifcfg-veth0 for
an interface named veth0 etc) network files for the corresponding VNIC interfaces.

E) Information about the VNIC interfaces

Information about the created VNIC interfaces can be obtained from
/sys/class/infiniband_vnic/interfaces/. A directory is created
for each interface under this directory.

The directory for each interface contains information about the interface
and the primary and secondary connections.

F) Deleting a specific VNIC interface

VNIC interfaces can be deleted by writing the name of the interface to 
the /sys/class/infiniband_vnic/interfaces/delete_vnic file.

For example to delete interface veth0

echo -n veth0 > /sys/class/infiniband_vnic/interfaces/delete_vnic


 
